A novel adaptive PD-type iterative learning control of the PMSM servo system with the friction uncertainty in low speeds

High precision demands in a large number of emerging robotic applications strengthened the role of the modern control laws in the position control of the Permanent Magnet Synchronous Motor (PMSM) servo system. This paper proposes a learning-based adaptive control approach to improve the PMSM position tracking in the presence of the friction uncertainty. In contrast to most of the reported works considering the servos operating at high speeds, this paper focuses on low speeds in which the friction stemmed deteriorations become more obvious. In this paper firstly, a servo model involving the Stribeck friction dynamics is formulated, and the unknown friction parameters are identified by a genetic algorithm from the offline data. Then, a feedforward controller is designed to inject the friction information into the loop and eliminate it before causing performance degradations. Since the friction is a kind of disturbance and leads to uncertainties having time-varying characters, an Adaptive Proportional Derivative (APD) type Iterative Learning Controller (ILC) named as the APD-ILC is designed to mitigate the friction effects. Finally, the proposed control approach is simulated in MATLAB/Simulink environment and it is compared with the conventional Proportional Integral Derivative (PID) controller, Proportional ILC (P-ILC), and Proportional Derivative ILC (PD-ILC) algorithms. The results confirm that the proposed APD-ILC significantly lessens the effects of the friction and thus noticeably improves the control performance in the low speeds of the PMSM.


Introduction
Recent emerging advancements in the automation technology have redefined the role of the robotics and mechatronics systems in modern-day industrial world. To perform various tasks like the welding, machine tending, grinding, packaging, assembling and material transporting, a variety of robots such as the industrial robot manipulators [1], wheeled mobile robots [2] and track-driven mobile robots [3] have been widely considered. Owing to stringent requirements of the precision and accuracy in a highly nonlinear and dynamic environments, there is an increasing demand to develop novel actuation and control technologies for these industrial robots [4,5]. a1111111111 a1111111111 a1111111111 a1111111111 a1111111111 The PMSM has been broadly used in industrial robots, high-precision CNC machines, and other applications employing servo control due to its small size, simple structure, low moment of inertia, and high-power density. It is reported that the servo control systems performing repetitive tasks can theoretically achieve satisfactory tracking results using the ILC [6]. However, various disturbances, modeling errors [7], and time-varying system parameters [8] adversely affect the convergence of the ILC. Therefore, the control community is actively working on the ILC-based control of the PMSM servo systems working under the dynamic uncertainties [9]. Recently, researchers have combined the adaptive control and ILC to form Adaptive Iterative Learning Control (AILC) [10,11], which exploits the ILC to solve the repetitive tracking problems [12,13] and adaptive control to handle the system uncertainty problem. Thus, AILC improves the tracking accuracy of the PMSM servo system and also accelerates the controller speed of convergence in the presence of the uncertainties [14,15].
Compared with the 'traditional rotating motor and ball screw' drive mode, a Permanent Magnet Linear Synchronous Motor (PMLSM) adopts a direct-drive mode, without any conversion links in the middle and offers larger thrust, low loss, and fast response. Owing to these advantages, the PMLSM has been widely preferred in a large number of industrial applications [16][17][18]. However, the parametric changes, friction, measurement disturbances, and cogging force affect the motor motion which cause formidable control challenges. This necessitates a robust controller design with an ability to accurately track the reference trajectory by eliminating the detrimental effects of the uncertainties [19,20].
Due to the uncertainties in the PMSM servo system, its high precision tracking control with the conventional PID controller is challenging [21][22][23]. In addition, owing to the nature of underlying mathematical structure, it is not easy to fully compensate the nonlinearities of the motor with the linear control approaches having constant gains [24,25]. Work reported in [26] expressed that a disturbance predictor-based control can improve the tracking accuracy of the controller since it gains the disturbance rejection capability. Another work [27] employed an iterative learning approach to reduce the controller position gain in order to enhance the position tracking of a linear motor working in specific state intervals. However, increase in the number of iterations reduced the controller convergence speed [28]. Similarly, an open-loop P-type ILC for the compensation of the measurement noise has been presented in [29]. The non-repetitive disturbance considerably fluctuated the motor position since the controller was unable to handle the instant random changes in the disturbance [30,31].
Other types of control approaches without the friction disturbances are the intelligent control [32], adaptive fuzzy control [33] and Active Disturbance Rejection Control (ADRC) [34]. The Disturbance Observer (DOB) compensation methods are reviewed in [35]. The neural network control algorithm in [32] and the fuzzy control algorithm in [33,36,37] have approximated the friction characteristics by a genetic algorithm. A controller was then designed to compensate the friction. However, due to the hardware constraints, the intelligent control algorithm requires a large amount of online computations. The primary DOB disturbance compensation method in [38] and its counterpart ADRC in [34,39] both suppressed the friction, but their dynamic performances and stability analyses were not carried out [40,41].
In scientific literature, the PMSM vector control system has been established on the dq-axis transformed model with i d = 0 in which the transformed d-axis current (i d ) of the PMSM is kept at zero to ease the control problem. Generally, the influence of the uncertain factors such as the friction torque, cogging torque, modelling errors, and the time-varying parameters on the control system have been analyzed. The well-known state equations of the system have been established. Recently, a parametric AILC law has been formulated to lessens the deteriorations in the PMSM servo system's tracking accuracy and error divergence caused by the model uncertainty. The primary method is to add adaptive iterative feature to the PD-based feedback control law. Through the parameter learning, the unknown parameters of the control law are identified. Then, based on the previous learning law, an enhanced version of the adaptive iterative learning law is presented. This corresponds to adding a time-domain estimate of the unknown parameters to the former learning law while taking full advantage of the information in both the continuous and discrete times.
Given the nonlinear approximation ability of the neural networks, a number of researchers have used them to identify the frictional torque and compensate it with the controller [42][43][44][45]. The neural network can be either used as the central controller or is combined with other control algorithms to gain adaptive control properties [46]. The robustness of the controller against the friction and other disturbances has been demonstrated in [47,48] which present suitable entropy-based ILC compensation and in [49,50] where various ILC approaches are introduced. Fuzzy control with adaptive internal model control can also be used as a disturbance suppression approach. For example, in [51,52] an improved internal model control is utilized for the speed control and two disturbance observers estimate the moment of inertia and the PMSM load. In [51], the motor disturbances have observed by the combination of an uncertainty predictor and a state predictor. Its feedforward compensation has been applied to the control system by using the uncertainty predictor estimates which leads to a superior control performance. A further research reported in [53] presented a hybrid control scheme based on sliding mode control and disturbance rejection of a second order PMSM system whose efficiency has been demonstrated through experimental validation.
In recent years, a number of researchers have adopted robust adaptive control, especially the adaptive backstepping law, to achieve high accuracy in servo control [54][55][56][57]. Majority of the reported works considered the motor's high speed and thus an improvement in performance at relatively low speeds is still an open research area. This paper focuses on the control of the PMSM running at low speeds where the friction Stribeck compensation problem occurs. To handle the identified friction uncertainty, the APD-ILC position control algorithm, which is an iterative and adaptive control approach, is developed. Simulations are performed to qualitatively analyze the results and verify the position tracking and the friction compensation abilities of the APD-ILC algorithm.
The control algorithm incorporates the friction model in the form of the feedforward control to generate a friction-free APD-ILC algorithm. The typical ILC relies on powerful mathematical calculations instead of precise models. On the other hand, the degree of function compensation is primarily determined by the filter's bandwidth, which is restricted by variables such as the mechanical resonance in the system. Consequently, there is a limited capacity to adjust for friction nonlinearity at zero speed. Basically, the proposed technique updates the learning gain of the controller according to the magnitude of the error to improve the tracking accuracy of the system. At the same time, the exponential learning gain is introduced into the differential coefficient of the controller to speed up the convergence. Finally, the efficiency of the proposed control technique is demonstrated in simulation.
This article is divided into five sections. Section 2 derives the model of a PMSM, Section 3 provides the convergence analysis, theory of adaptive ILC, nonlinear gain function, and the sufficient conditions for the error convergence Section 4 presents simulation results to validate the proposed control approach and finally, Section 5 concludes the paper.

Permanent Magnet Synchronous Motor System (PMSM) model
This research considers a surface-mounted PMSM model transformed in the dq-axis. The typical PMSM mathematical model is given in Eq (1), which uses the notations presented in Table 1.
where u d , u q are the stator voltages and i d , i q are the armature currents and the L d , L q are the stator inductances on the dq-axis of the motor, n p is the number of the pole pairs of the PMSM, R s is the stator resistance, ω is the mechanical angular velocity of the motor rotor, ψ f is the rotor flux corresponding to the permanent magnet, J is the rotational inertia, B m is the viscous damping. In the actual system, to decouple the speed and current, the vector control mode of i � d � 0 is often used. The equation of the electromagnetic torque can be written as: where T L is the load torque, and K t is the torque constant.

PLOS ONE
Let F be the system friction torque, θ be the rotational angle of the motor rotor, J be the sum of the motor and load moment of inertia, then Eq (2) can be re-formulated as: A friction model in [58] is used here to fully describe the friction encountered by the PMSM servo system. The model is represented by the expression; where F c is the Coulomb friction torque, _ y is the rotational angular velocity, F c is the static friction torque, _ y s is the Stribeck characteristic velocity.

PLOS ONE
friction. The Stribeck friction model can be expressed as in Eqs (5) and (6). When the static friction is j _ yðtÞj < a, with α threshold, the dynamic friction F f (t) can be given by (5).
On the other hand, when the static friction is j _ yðtÞj > a, F f (t) can be given as; where F m denotes the driving force, F c represents the maximum static friction force, α 1 is a small scaling factor.

Identification of the friction parameters
The genetic algorithm is a probabilistic search optimization approach that imitates the organisms' genetic and evolutionary processes in their natural environment. It can solve complex and poorly known nonlinear optimization problems without requiring the model of the system. The optimization search can be carried out throughout the range of a pre-determined unknown parameter space and the best parameter solutions are selected among them [59].
The genetic algorithm can also avoid local minima with rich and diverse exploration signals, so it gains a wide range of adaptability and strong robustness. Fig 2 shows the overall APD-ILC architecture.
In Fig 2, the desired angular position y � d is compared with the measured angular position θ � to generate the angular position tracking error. This error is processed by the APD-ILC and the corresponding feedforward control signal is subtracted from the position tracking error weighted with the C 1 . This yields a further tracking error which is transformed by the C 2 weighting value and compared with the i q current on the q-axis together with the friction model output to produce the i � q desired current. This comparison error is evaluated by the traditional PI controller which feeds the model transformed from dq-axis to αβ-axis. Similarly, in case of the desired current i � d ¼ 0, a further PI controller assesses the i d current on the d-axis and provides the control signal for the dq-axis to αβ-axis transformer. The outputs of this transformer are modulated by the Space Vector Modulation (SVM) component and the Voltage Source Inverters (VSI) provides the required 3-phase voltage for the PMSM. When the system is in steady-state, the angular velocity becomes _ o ¼ 0 and without the load T L = 0, Eq (1) becomes F = T e = B m ω.
In terms of the PMSM speed control, consider a set of constant speed n p ψ f as the command signal. According to Eq (6), construct the identifierFðx; _ y i Þ and set the parameter to be identified as where A quadratic objective function is formulated as: Typically, the traditional optimization methods begin randomly and then iteratively decide on the best result from the solution space. Due to the limited amount of information offered by a single set of training data, the search performance can be poor, and also the search may get locked in the local optimum solution thus entering in stall mode due to insufficient exploration. Properly excited search may help to steadily acquire the global optimal solution by preventing the optimization for superfluous spots and avoiding slipping into the local optimum solution.
Genetic algorithms include selection, crossover and mutation processes and offers a larger likelihood of the global convergence to the optimum solution and a greater capacity to solve the uncertain optimization problems. However, factors such as the crossover probability and mutation probability have an effect on the algorithm's search results and efficiency thus highlighting critical role of the genetic algorithm parameters for a particular application is important.

Bit string mutation
The mutation of bit strings ensues through bit flips at random positions. For instance: The moment of the pattern, i.e. the length of the pattern, is the distance from the left to right between the first non-� bit and the last non-� bit of the pattern. The moment of the pattern is denoted by δ(H). e.g.
A random number of initial groups encoded with a certain length (which is proportional to the unknown parameter spaces) is created. Each individual is evaluated using the fitness function, and those with a better fitness rating are chosen to engage in the genetic operation, while those with a poor fitness score are removed from the solutions. A group of genetically modified individuals (through replication, crossover, or mutation) generates a new generation population until the stop requirement is fulfilled. The most fully developed person among the descendants is considered to be the outcome of the genetic algorithm. With the mutation, the sequence before the mutation x = x 1 x 2 . . .x i might become to x = x 2 x 1 . . ..x i−2 for i number of the initial population. The range of each population has a constrained value for each sample k between ½u k min ; u k max �. The boundaries are implemented on the x k parameter population as: where random(0,1) is generates 0 or 1 values randomly. The problem of friction parameter identification is to find the parameter vector xin Eq (7) that minimizes the objective function in Eq (10). The decimal floating-point coding format is used for encoding the parameter vector to identify the individual solutions. The selection operation involves a random sampling method that saves the optimal individuals. The overall identified values are compared in Table 2 below. The crossover operation adopts the uniform crossover operator, and the mutation assumes the basic bit. The maximum evolutionary number is 200 with a population size i of 50. The crossover probability is 0.9 and the mutation probability is 0.05. Parameter range F s is [0,1], F c is [0,1], B m is [0,0.05]. Finally, the Stribeck characteristic velocity is _ y s ¼ ½0; 0:05�:

Adaptive ILC-based feedforward controller
According to the Fig 1, the feedforward compensation is achieved in terms of manipulating the motor currents. Eq (2) can be re-written with the friction torque as: The friction torque F is given by The friction model identified in the section 2.2 is used to perform friction compensation of the PMSM servo system. The proposed feedforward controller is shown in Fig 2. The total control output of the system is sum of the outputs of the PI feedback controllers and the friction feedforward controller given by where iF ¼F K t is the estimated friction torque and i C is produced by the adaptive ILC. The general control structure is shown in Fig 3. The PMSM given in Eq (1) with the added Stribeck friction is linearized around the operating points and put in the state space form as: where A,B,C are the linear system matrices and vectors, d(T L ,T F ) is the disturbances stemmed from the load and the Stribeck friction, x(t) system state vector, u(t) is the controlled i q current, η(t) is the measurement noise type uncertainty. Eq (15) presents the briefed version of the state space representation in Eq (14).
The next sub-section introduces the P-ILC design.

P-ILC design
A simple control law based on P-ILC is expressed as: where � u kþ1 ðtÞ represents the updated control signal andê k ðtÞ is the tracking error. The well-known condition for the error convergence of the P-ILC algorithm can be described by: The next sub-section provides the APD-ILC algorithm.  Fig 3, y d denotes the desired position, y k represents the output position of the system at (k+1) th iteration, z k+1 is the measurement signal at the (k+1) th iteration, e k+1 is the position error of (k+1) th iteration, η k+1 denotes the disturbance signal. Before analyzing the system, two definitions need to be made. The reference tracking error is defined as:

APD-ILC algorithm
The measurement error � k (t) is defined as: One can conclude from Fig 1 that y k ðtÞ ¼ z k ðtÞ À Z k ðtÞ and combining Eqs (18) and (19) yields The traditional PD-ILC law is formulated as: where K 1 and K 2 are the constant learning gains of the controller. The APD-ILC law with adaptive learning gains is designed as: where e βt is an exponential variable gain with 0<β�1, f(.) is a nonlinear function related to the error boundary α and changes with the size of the error as: : The resulting curve of the nonlinear error function in Eq (24) is shown in Fig 4. Remark 1: For the PD-ILC with adaptive learning gains in Eq (22), it is clear that, for 8k2 {0,1,2,� � �}, where τ p and τ d are the proportional and derivative time constants, k 0 and k 1 are the lower and upper limit scaling factors of the controller gains.

Remark 2:
The selection principle of parameter α is as follows: A larger α leads to f(.) with a larger opening concavity, so that a small amplitude of error e k can lead to a small value of f(.). Therefore, one should determine the value of α according to the amplitude of the random measurement noise, i.e. an error with a small amplitude needs a large α to suppress [60].
The effect of different parameters on the shape of the nonlinear function f(.) and the relationship between f(.) and the error e k can be seen in Fig 4. As α increases from 0.1 to 0. 5, the f (e k ) function reaches its maximum determined by the upper limit k 1 . It shows that the learning gain can be adaptively adjusted for the small errors as well as the large errors. The three curves in Fig 4 an show that the error is intuitively adjusted and compensated with the exponential gain function.
The typical nonlinear function g(e k , Δe k ) versus its sample differenced error Δe k are shown in Fig 5. In Fig 5, the sample difference error Δe k has consistent error signs during the learning process of the APD-ILC parameters. This shows that the learning process is smooth due to continuous nature of the control problem and occurs in a stable state region without chattering around the controller operating points.
Changing the damping of the controller or differential learning gain (K 1 ) improves the adjustment speed and bandwidth of the system. It is stated that when the system error and its differential gains are different, the gains tend to reduce the tracking error. However, when the error and its rate of change are of the same sign, the value of the differential gain is increased which can improve the speed of error convergence and also leads to more stable system. Therefore, to remove the disturbance signal while retaining the useful signal, α should be selected to be smaller than the measurement disturbance amplitude and smaller than the error value of the amplitude.

Simulation results and discussions
Three control algorithms are simulated in MATLAB/Simulink environment to validate the effect of friction compensation proposed in this paper. These algorithms are the conventional PID control without feedforward compensation, P-ILC and APD-ILC algorithms. The parameters of the PMSM considered in this paper are given in Table 3.
The controller and filter parameters are given in Table 4.   It is clear that there is a bias between the reference trajectory and trajectory produced by the conventional PID controller. Therefore, the controller is unable to track the desired trajectories.
As can be seen from Fig 8, when the speed approaches zero, there is a static friction dominance whose change is multi-valued and discontinuous. This results in a noisy speed trajectory effected by the 'Stribeck' friction. The noise base fluctuations harm the PMSM and henceforth, they need to be compensated by the controller. However, the conventional PID controller is unable to handle such disturbances and therefore, this problem should be addressed by the adaptive control approaches.
We can compare the results of the P-ILC, PID and the proposed APD-ILC algorithms as in Fig 9. It is clear from the results that the conventional PID cannot accurately track the desired position. Even though the conventional P-ILC algorithm attempts to track the desired position, it eventually yields a noticeable tracking error. Thus, the error cannot be eliminated  that the friction compensation strategy dramatically improves the speed trajectory in the presence of the Stribeck friction. Table 5 shows the position tracking errors for the P-ILC, PD-ILC and APD-ILC algorithms. It can be noticed that the proposed APD-ILC yields tracking error almost the half of the other control algorithms. After 20 th iterations, the errors of P-ILC and PD-ILC algorithms produce 0.175381 and 0.024335 errors, respectively. It is clear that all the tracking errors reduce consecutively with the number of iterations increases. This occurs because all these control algorithms learn the unknown control parameters iteratively. The tracking error of the proposed APD-ILC algorithm is the smallest as compared to the other two control algorithms. Therefore, it can be easily observed from the Table 5 that the convergence speed of the proposed APD-ILC algorithm in this paper has significantly higher accuracy compared to other traditional control algorithms.
The position tracking error trajectories for the P-ILC, PD-ILC and APD-ILC algorithms are shown in Fig 14 with respect to the number of iterations. Due to the adaptive property of the APD-ILC algorithm, its RMS tracking error reduces quicker through the 30 iterations. Eventually, the tracking error converges to zero with increasing number of iterations which indicates that the proposed controller is efficient in dealing with motor nonlinearities and the Stribeck friction, particularly in servo control applications.

Conclusion
This paper proposed the APD-ILC algorithm to handle the Stribeck friction problem in the PMSM servo system. The genetic algorithm has been used to identify the nonlinear Stribeck friction unknown parameters with the offline training data and the constructed friction model was then used for the feedforward compensation. Finally, the APD-ILC algorithm has been designed to compensate the predicted Stribeck friction and also to track the desired position trajectory. An extensive comparison analyses has been performed to show the effectiveness and reliability of the proposed adaptive method. It was revealed that the conventional PID, P-ILC, PD-ILC algorithms were unable to overcome the friction disturbance properly, whereas the proposed APD-ILC was able consider the Stribeck friction and also eliminate it as desired. Thus, the proposed APD-ILC algorithm is robust and efficient to deal with the nonlinearities compared to the conventional control approaches. Other nonlinearities such as the parameter uncertainties in the servo system, gears backlash, and combined friction nonlinearity with external load disturbances can be considered in future research.